1. Field of the Invention
The present invention generally relates to computer-aided design and, more specifically, to a system and method for generating for-each label components to label elements in a computer-aided design (CAD) drawing.
2. Description of the Related Art
The term computer-aided design (CAD) generally refers to a broad variety of computer-based tools used by architects, engineers, and other construction and design professionals. CAD applications may be used to construct computer models representing virtually any real-world construct. For example, computer-aided design (CAD) applications are frequently used to compose graphical representations of civil engineering constructs such as utility networks. Using a CAD application, a user may compose a CAD drawing by selecting drawing elements and positioning them within the drawing. Typically, drawing elements are provided to represent elements of the object being modeled. In the case of a utility network, drawing elements may represent segments of pipes, and structures such as manholes, catch basins, grates, headwalls, etc.
Additionally, CAD drawings may be used to convey architectural, construction, engineering, and other information related to the object modeled by a CAD drawing. Often, this information is provided in the form of labels associated with of elements in a CAD drawing. For example, a segment of pipe may include a label indicating the length and diameter of the pipe. More complex labels may indicate pipe material or even information such as an intended supplier cost, or tolerances of the pipe. Other elements in a drawing may also have labels appropriate for their individual element types. Such labels may be generated and displayed on screen and also included in construction or engineering documentation generated from a CAD drawing.
Given the usefulness of these kinds of labels, CAD applications often allow users to define a label style to use for a particular drawing element. Thereafter, any instances of that element in a CAD drawing may have a label generated according to the style. Further, if the properties of a drawing element change (e.g., a pipe is made longer), the label may be updated accordingly. This technique works well for labeling drawing elements with a fixed set of fields (e.g., the length and diameter of a drawing element representing a segment of pipe). However, as drawing elements become more complex, labeling systems that create labels by populating a fixed number of fields prove to be inadequate. For example, a drawing element representing a manhole structure (i.e., a concrete underground box) may have some number of pipes attached to it. The exact number may depend on the use of the manhole structure in a particular CAD drawing. Generating a label style for this type of structure cannot be done using the general process described above, as the number of pipe elements connected to the manhole structure is not known in advance.
One approach to creating labels for complex drawing elements is for users to create labels without relying on a label style. In such an approach, a user may inspect a CAD drawing to identify a set of drawing elements that are associated or related with a drawing element being labeled (e.g., a manhole structure), and then manually compose a label that includes data regarding each associated drawing element. If the drawing element is modified, a label of that element must be updated by hand as well. In addition to being tedious, this approach may lead to inaccurate labeling, because users may neglect to update a label after modifying elements of a CAD drawing.
Accordingly, there remains a need in the art for techniques to define, generate and display dynamic labels for elements in a CAD drawing that may include some unknown number of associated or related drawing elements.